<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Misc.StringSet.html">
<link rel="next" href="Misc.Color.html">
<link rel="Up" href="Misc.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Arg" rel="Chapter" href="Arg.html">
<link title="Arg_helper" rel="Chapter" href="Arg_helper.html">
<link title="Array" rel="Chapter" href="Array.html">
<link title="ArrayLabels" rel="Chapter" href="ArrayLabels.html">
<link title="Ast_helper" rel="Chapter" href="Ast_helper.html">
<link title="Ast_invariants" rel="Chapter" href="Ast_invariants.html">
<link title="Ast_iterator" rel="Chapter" href="Ast_iterator.html">
<link title="Ast_mapper" rel="Chapter" href="Ast_mapper.html">
<link title="Asttypes" rel="Chapter" href="Asttypes.html">
<link title="Attr_helper" rel="Chapter" href="Attr_helper.html">
<link title="Bigarray" rel="Chapter" href="Bigarray.html">
<link title="Buffer" rel="Chapter" href="Buffer.html">
<link title="Builtin_attributes" rel="Chapter" href="Builtin_attributes.html">
<link title="Bytes" rel="Chapter" href="Bytes.html">
<link title="BytesLabels" rel="Chapter" href="BytesLabels.html">
<link title="Callback" rel="Chapter" href="Callback.html">
<link title="CamlinternalFormat" rel="Chapter" href="CamlinternalFormat.html">
<link title="CamlinternalFormatBasics" rel="Chapter" href="CamlinternalFormatBasics.html">
<link title="CamlinternalLazy" rel="Chapter" href="CamlinternalLazy.html">
<link title="CamlinternalMod" rel="Chapter" href="CamlinternalMod.html">
<link title="CamlinternalOO" rel="Chapter" href="CamlinternalOO.html">
<link title="Ccomp" rel="Chapter" href="Ccomp.html">
<link title="Char" rel="Chapter" href="Char.html">
<link title="Clflags" rel="Chapter" href="Clflags.html">
<link title="Complex" rel="Chapter" href="Complex.html">
<link title="Condition" rel="Chapter" href="Condition.html">
<link title="Config" rel="Chapter" href="Config.html">
<link title="Consistbl" rel="Chapter" href="Consistbl.html">
<link title="Depend" rel="Chapter" href="Depend.html">
<link title="Digest" rel="Chapter" href="Digest.html">
<link title="Docstrings" rel="Chapter" href="Docstrings.html">
<link title="Dynlink" rel="Chapter" href="Dynlink.html">
<link title="Ephemeron" rel="Chapter" href="Ephemeron.html">
<link title="Event" rel="Chapter" href="Event.html">
<link title="Filename" rel="Chapter" href="Filename.html">
<link title="Format" rel="Chapter" href="Format.html">
<link title="Gc" rel="Chapter" href="Gc.html">
<link title="Genlex" rel="Chapter" href="Genlex.html">
<link title="Graphics" rel="Chapter" href="Graphics.html">
<link title="GraphicsX11" rel="Chapter" href="GraphicsX11.html">
<link title="Hashtbl" rel="Chapter" href="Hashtbl.html">
<link title="Identifiable" rel="Chapter" href="Identifiable.html">
<link title="Int32" rel="Chapter" href="Int32.html">
<link title="Int64" rel="Chapter" href="Int64.html">
<link title="Lazy" rel="Chapter" href="Lazy.html">
<link title="Lexer" rel="Chapter" href="Lexer.html">
<link title="Lexing" rel="Chapter" href="Lexing.html">
<link title="List" rel="Chapter" href="List.html">
<link title="ListLabels" rel="Chapter" href="ListLabels.html">
<link title="Location" rel="Chapter" href="Location.html">
<link title="Longident" rel="Chapter" href="Longident.html">
<link title="Map" rel="Chapter" href="Map.html">
<link title="Marshal" rel="Chapter" href="Marshal.html">
<link title="Misc" rel="Chapter" href="Misc.html">
<link title="MoreLabels" rel="Chapter" href="MoreLabels.html">
<link title="Mutex" rel="Chapter" href="Mutex.html">
<link title="Nativeint" rel="Chapter" href="Nativeint.html">
<link title="Numbers" rel="Chapter" href="Numbers.html">
<link title="Obj" rel="Chapter" href="Obj.html">
<link title="Oo" rel="Chapter" href="Oo.html">
<link title="Parse" rel="Chapter" href="Parse.html">
<link title="Parser" rel="Chapter" href="Parser.html">
<link title="Parsetree" rel="Chapter" href="Parsetree.html">
<link title="Parsing" rel="Chapter" href="Parsing.html">
<link title="Pervasives" rel="Chapter" href="Pervasives.html">
<link title="Pparse" rel="Chapter" href="Pparse.html">
<link title="Pprintast" rel="Chapter" href="Pprintast.html">
<link title="Printast" rel="Chapter" href="Printast.html">
<link title="Printexc" rel="Chapter" href="Printexc.html">
<link title="Printf" rel="Chapter" href="Printf.html">
<link title="Profile" rel="Chapter" href="Profile.html">
<link title="Queue" rel="Chapter" href="Queue.html">
<link title="Random" rel="Chapter" href="Random.html">
<link title="Scanf" rel="Chapter" href="Scanf.html">
<link title="Set" rel="Chapter" href="Set.html">
<link title="Simplif" rel="Chapter" href="Simplif.html">
<link title="Sort" rel="Chapter" href="Sort.html">
<link title="Spacetime" rel="Chapter" href="Spacetime.html">
<link title="Stack" rel="Chapter" href="Stack.html">
<link title="StdLabels" rel="Chapter" href="StdLabels.html">
<link title="Str" rel="Chapter" href="Str.html">
<link title="Stream" rel="Chapter" href="Stream.html">
<link title="String" rel="Chapter" href="String.html">
<link title="StringLabels" rel="Chapter" href="StringLabels.html">
<link title="Strongly_connected_components" rel="Chapter" href="Strongly_connected_components.html">
<link title="Syntaxerr" rel="Chapter" href="Syntaxerr.html">
<link title="Sys" rel="Chapter" href="Sys.html">
<link title="Targetint" rel="Chapter" href="Targetint.html">
<link title="Tbl" rel="Chapter" href="Tbl.html">
<link title="Terminfo" rel="Chapter" href="Terminfo.html">
<link title="Thread" rel="Chapter" href="Thread.html">
<link title="ThreadUnix" rel="Chapter" href="ThreadUnix.html">
<link title="Typemod" rel="Chapter" href="Typemod.html">
<link title="Uchar" rel="Chapter" href="Uchar.html">
<link title="Unix" rel="Chapter" href="Unix.html">
<link title="UnixLabels" rel="Chapter" href="UnixLabels.html">
<link title="Warnings" rel="Chapter" href="Warnings.html">
<link title="Weak" rel="Chapter" href="Weak.html"><title>Misc.StringMap</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Misc.StringSet.html" title="Misc.StringSet">Previous</a>
&nbsp;<a class="up" href="Misc.html" title="Misc">Up</a>
&nbsp;<a class="post" href="Misc.Color.html" title="Misc.Color">Next</a>
</div>
<h1>Module <a href="type_Misc.StringMap.html">Misc.StringMap</a></h1>

<pre><span id="MODULEStringMap"><span class="keyword">module</span> StringMap</span>: <code class="type"><a href="Map.S.html">Map.S</a></code><code class="type">  with type key = string</code></pre><hr width="100%">

<pre><span id="TYPEkey"><span class="keyword">type</span> <code class="type"></code>key</span> </pre>
<div class="info ">
<div class="info-desc">
<p>The type of the map keys.</p>
</div>
</div>


<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">+'a</code> t</span> </pre>
<div class="info ">
<div class="info-desc">
<p>The type of maps from type <code class="code">key</code> to type <code class="code"><span class="keywordsign">'</span>a</code>.</p>
</div>
</div>


<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>The empty map.</p>
</div>
</div>

<pre><span id="VALis_empty"><span class="keyword">val</span> is_empty</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p>Test whether a map is empty or not.</p>
</div>
</div>

<pre><span id="VALmem"><span class="keyword">val</span> mem</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">mem&nbsp;x&nbsp;m</code> returns <code class="code"><span class="keyword">true</span></code> if <code class="code">m</code> contains a binding for <code class="code">x</code>,
       and <code class="code"><span class="keyword">false</span></code> otherwise.</p>
</div>
</div>

<pre><span id="VALadd"><span class="keyword">val</span> add</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">add&nbsp;x&nbsp;y&nbsp;m</code> returns a map containing the same bindings as
       <code class="code">m</code>, plus a binding of <code class="code">x</code> to <code class="code">y</code>. If <code class="code">x</code> was already bound
       in <code class="code">m</code> to a value that is physically equal to <code class="code">y</code>,
       <code class="code">m</code> is returned unchanged (the result of the function is
       then physically equal to <code class="code">m</code>). Otherwise, the previous binding
       of <code class="code">x</code> in <code class="code">m</code> disappears.</p>
</div>
<ul class="info-attributes">
<li><b>Before 4.03 </b> Physical equality was not ensured.</li>
</ul>
</div>

<pre><span id="VALupdate"><span class="keyword">val</span> update</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> ('a option -> 'a option) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">update&nbsp;x&nbsp;f&nbsp;m</code> returns a map containing the same bindings as
        <code class="code">m</code>, except for the binding of <code class="code">x</code>. Depending on the value of
        <code class="code">y</code> where <code class="code">y</code> is <code class="code">f&nbsp;(find_opt&nbsp;x&nbsp;m)</code>, the binding of <code class="code">x</code> is
        added, removed or updated. If <code class="code">y</code> is <code class="code"><span class="constructor">None</span></code>, the binding is
        removed if it exists; otherwise, if <code class="code">y</code> is <code class="code"><span class="constructor">Some</span>&nbsp;z</code> then <code class="code">x</code>
        is associated to <code class="code">z</code> in the resulting map.  If <code class="code">x</code> was already
        bound in <code class="code">m</code> to a value that is physically equal to <code class="code">z</code>, <code class="code">m</code>
        is returned unchanged (the result of the function is then
        physically equal to <code class="code">m</code>).</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.06.0</li>
</ul>
</div>

<pre><span id="VALsingleton"><span class="keyword">val</span> singleton</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">singleton&nbsp;x&nbsp;y</code> returns the one-element map that contains a binding <code class="code">y</code>
        for <code class="code">x</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">remove&nbsp;x&nbsp;m</code> returns a map containing the same bindings as
       <code class="code">m</code>, except for <code class="code">x</code> which is unbound in the returned map.
       If <code class="code">x</code> was not in <code class="code">m</code>, <code class="code">m</code> is returned unchanged
       (the result of the function is then physically equal to <code class="code">m</code>).</p>
</div>
<ul class="info-attributes">
<li><b>Before 4.03 </b> Physical equality was not ensured.</li>
</ul>
</div>

<pre><span id="VALmerge"><span class="keyword">val</span> merge</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a option -> 'b option -> 'c option) -><br>       'a <a href="Map.S.html#TYPEt">t</a> -> 'b <a href="Map.S.html#TYPEt">t</a> -> 'c <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">merge&nbsp;f&nbsp;m1&nbsp;m2</code> computes a map whose keys is a subset of keys of <code class="code">m1</code>
        and of <code class="code">m2</code>. The presence of each such binding, and the corresponding
        value, is determined with the function <code class="code">f</code>.
        In terms of the <code class="code">find_opt</code> operation, we have
        <code class="code">find_opt&nbsp;x&nbsp;(merge&nbsp;f&nbsp;m1&nbsp;m2)&nbsp;=&nbsp;f&nbsp;(find_opt&nbsp;x&nbsp;m1)&nbsp;(find_opt&nbsp;x&nbsp;m2)</code>
        for any key <code class="code">x</code>, provided that <code class="code">f&nbsp;<span class="constructor">None</span>&nbsp;<span class="constructor">None</span>&nbsp;=&nbsp;<span class="constructor">None</span></code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALunion"><span class="keyword">val</span> union</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> 'a -> 'a option) -><br>       'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">union&nbsp;f&nbsp;m1&nbsp;m2</code> computes a map whose keys is the union of keys
        of <code class="code">m1</code> and of <code class="code">m2</code>.  When the same binding is defined in both
        arguments, the function <code class="code">f</code> is used to combine them.
        This is a special case of <code class="code">merge</code>: <code class="code">union&nbsp;f&nbsp;m1&nbsp;m2</code> is equivalent
        to <code class="code">merge&nbsp;f'&nbsp;m1&nbsp;m2</code>, where</p>
<ul>
<li><code class="code">f'&nbsp;<span class="constructor">None</span>&nbsp;<span class="constructor">None</span>&nbsp;=&nbsp;<span class="constructor">None</span></code></li>
<li><code class="code">f'&nbsp;(<span class="constructor">Some</span>&nbsp;v)&nbsp;<span class="constructor">None</span>&nbsp;=&nbsp;<span class="constructor">Some</span>&nbsp;v</code></li>
<li><code class="code">f'&nbsp;<span class="constructor">None</span>&nbsp;(<span class="constructor">Some</span>&nbsp;v)&nbsp;=&nbsp;<span class="constructor">Some</span>&nbsp;v</code></li>
<li><code class="code">f'&nbsp;(<span class="constructor">Some</span>&nbsp;v1)&nbsp;(<span class="constructor">Some</span>&nbsp;v2)&nbsp;=&nbsp;f&nbsp;v1&nbsp;v2</code></li>
</ul>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.03.0</li>
</ul>
</div>

<pre><span id="VALcompare"><span class="keyword">val</span> compare</span> : <code class="type">('a -> 'a -> int) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<div class="info-desc">
<p>Total ordering between maps.  The first argument is a total ordering
        used to compare data associated with equal keys in the two maps.</p>
</div>
</div>

<pre><span id="VALequal"><span class="keyword">val</span> equal</span> : <code class="type">('a -> 'a -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">equal&nbsp;cmp&nbsp;m1&nbsp;m2</code> tests whether the maps <code class="code">m1</code> and <code class="code">m2</code> are
       equal, that is, contain equal keys and associate them with
       equal data.  <code class="code">cmp</code> is the equality predicate used to compare
       the data associated with the keys.</p>
</div>
</div>

<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> unit) -> 'a <a href="Map.S.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">iter&nbsp;f&nbsp;m</code> applies <code class="code">f</code> to all bindings in map <code class="code">m</code>.
       <code class="code">f</code> receives the key as first argument, and the associated value
       as second argument.  The bindings are passed to <code class="code">f</code> in increasing
       order with respect to the ordering over the type of the keys.</p>
</div>
</div>

<pre><span id="VALfold"><span class="keyword">val</span> fold</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> 'b -> 'b) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'b -> 'b</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">fold&nbsp;f&nbsp;m&nbsp;a</code> computes <code class="code">(f&nbsp;kN&nbsp;dN&nbsp;...&nbsp;(f&nbsp;k1&nbsp;d1&nbsp;a)...)</code>,
       where <code class="code">k1&nbsp;...&nbsp;kN</code> are the keys of all bindings in <code class="code">m</code>
       (in increasing order), and <code class="code">d1&nbsp;...&nbsp;dN</code> are the associated data.</p>
</div>
</div>

<pre><span id="VALfor_all"><span class="keyword">val</span> for_all</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">for_all&nbsp;p&nbsp;m</code> checks if all the bindings of the map
        satisfy the predicate <code class="code">p</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">exists&nbsp;p&nbsp;m</code> checks if at least one binding of the map
        satisfies the predicate <code class="code">p</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALfilter"><span class="keyword">val</span> filter</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">filter&nbsp;p&nbsp;m</code> returns the map with all the bindings in <code class="code">m</code>
        that satisfy predicate <code class="code">p</code>. If <code class="code">p</code> satisfies every binding in <code class="code">m</code>,
        <code class="code">m</code> is returned unchanged (the result of the function is then
        physically equal to <code class="code">m</code>)</p>
</div>
<ul class="info-attributes">
<li><b>Before 4.03 </b> Physical equality was not ensured.</li>
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALpartition"><span class="keyword">val</span> partition</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a> * 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">partition&nbsp;p&nbsp;m</code> returns a pair of maps <code class="code">(m1,&nbsp;m2)</code>, where
        <code class="code">m1</code> contains all the bindings of <code class="code">s</code> that satisfy the
        predicate <code class="code">p</code>, and <code class="code">m2</code> is the map with all the bindings of
        <code class="code">s</code> that do not satisfy <code class="code">p</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALcardinal"><span class="keyword">val</span> cardinal</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<div class="info-desc">
<p>Return the number of bindings of a map.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALbindings"><span class="keyword">val</span> bindings</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) list</code></pre><div class="info ">
<div class="info-desc">
<p>Return the list of all bindings of the given map.
       The returned list is sorted in increasing order with respect
       to the ordering <code class="code"><span class="constructor">Ord</span>.compare</code>, where <code class="code"><span class="constructor">Ord</span></code> is the argument
       given to <a href="Map.Make.html"><code class="code"><span class="constructor">Map</span>.<span class="constructor">Make</span></code></a>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALmin_binding"><span class="keyword">val</span> min_binding</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> <a href="Map.S.html#TYPEkey">key</a> * 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Return the smallest binding of the given map
       (with respect to the <code class="code"><span class="constructor">Ord</span>.compare</code> ordering), or raise
       <code class="code"><span class="constructor">Not_found</span></code> if the map is empty.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALmin_binding_opt"><span class="keyword">val</span> min_binding_opt</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) option</code></pre><div class="info ">
<div class="info-desc">
<p>Return the smallest binding of the given map
       (with respect to the <code class="code"><span class="constructor">Ord</span>.compare</code> ordering), or <code class="code"><span class="constructor">None</span></code>
       if the map is empty.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALmax_binding"><span class="keyword">val</span> max_binding</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> <a href="Map.S.html#TYPEkey">key</a> * 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Same as <a href="Map.S.html#VALmin_binding"><code class="code"><span class="constructor">Map</span>.<span class="constructor">S</span>.min_binding</code></a>, but returns the largest binding
        of the given map.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALmax_binding_opt"><span class="keyword">val</span> max_binding_opt</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) option</code></pre><div class="info ">
<div class="info-desc">
<p>Same as <a href="Map.S.html#VALmin_binding_opt"><code class="code"><span class="constructor">Map</span>.<span class="constructor">S</span>.min_binding_opt</code></a>, but returns the largest binding
        of the given map.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALchoose"><span class="keyword">val</span> choose</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> <a href="Map.S.html#TYPEkey">key</a> * 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Return one binding of the given map, or raise <code class="code"><span class="constructor">Not_found</span></code> if
       the map is empty. Which binding is chosen is unspecified,
       but equal bindings will be chosen for equal maps.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALchoose_opt"><span class="keyword">val</span> choose_opt</span> : <code class="type">'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) option</code></pre><div class="info ">
<div class="info-desc">
<p>Return one binding of the given map, or <code class="code"><span class="constructor">None</span></code> if
       the map is empty. Which binding is chosen is unspecified,
       but equal bindings will be chosen for equal maps.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALsplit"><span class="keyword">val</span> split</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a <a href="Map.S.html#TYPEt">t</a> * 'a option * 'a <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">split&nbsp;x&nbsp;m</code> returns a triple <code class="code">(l,&nbsp;data,&nbsp;r)</code>, where
          <code class="code">l</code> is the map with all the bindings of <code class="code">m</code> whose key
        is strictly less than <code class="code">x</code>;
          <code class="code">r</code> is the map with all the bindings of <code class="code">m</code> whose key
        is strictly greater than <code class="code">x</code>;
          <code class="code">data</code> is <code class="code"><span class="constructor">None</span></code> if <code class="code">m</code> contains no binding for <code class="code">x</code>,
          or <code class="code"><span class="constructor">Some</span>&nbsp;v</code> if <code class="code">m</code> binds <code class="code">v</code> to <code class="code">x</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 3.12.0</li>
</ul>
</div>

<pre><span id="VALfind"><span class="keyword">val</span> find</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find&nbsp;x&nbsp;m</code> returns the current binding of <code class="code">x</code> in <code class="code">m</code>,
       or raises <code class="code"><span class="constructor">Not_found</span></code> if no such binding exists.</p>
</div>
</div>

<pre><span id="VALfind_opt"><span class="keyword">val</span> find_opt</span> : <code class="type"><a href="Map.S.html#TYPEkey">key</a> -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'a option</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find_opt&nbsp;x&nbsp;m</code> returns <code class="code"><span class="constructor">Some</span>&nbsp;v</code> if the current binding of <code class="code">x</code>
        in <code class="code">m</code> is <code class="code">v</code>, or <code class="code"><span class="constructor">None</span></code> if no such binding exists.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALfind_first"><span class="keyword">val</span> find_first</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> <a href="Map.S.html#TYPEkey">key</a> * 'a</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find_first&nbsp;f&nbsp;m</code>, where <code class="code">f</code> is a monotonically increasing function,
       returns the binding of <code class="code">m</code> with the lowest key <code class="code">k</code> such that <code class="code">f&nbsp;k</code>,
       or raises <code class="code"><span class="constructor">Not_found</span></code> if no such key exists.</p>

<p>For example, <code class="code">find_first&nbsp;(<span class="keyword">fun</span>&nbsp;k&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">Ord</span>.compare&nbsp;k&nbsp;x&nbsp;&gt;=&nbsp;0)&nbsp;m</code> will return
       the first binding <code class="code">k,&nbsp;v</code> of <code class="code">m</code> where <code class="code"><span class="constructor">Ord</span>.compare&nbsp;k&nbsp;x&nbsp;&gt;=&nbsp;0</code>
       (intuitively: <code class="code">k&nbsp;&gt;=&nbsp;x</code>), or raise <code class="code"><span class="constructor">Not_found</span></code> if <code class="code">x</code> is greater than any
       element of <code class="code">m</code>.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALfind_first_opt"><span class="keyword">val</span> find_first_opt</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) option</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find_first_opt&nbsp;f&nbsp;m</code>, where <code class="code">f</code> is a monotonically increasing function,
       returns an option containing the binding of <code class="code">m</code> with the lowest key <code class="code">k</code>
       such that <code class="code">f&nbsp;k</code>, or <code class="code"><span class="constructor">None</span></code> if no such key exists.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALfind_last"><span class="keyword">val</span> find_last</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> <a href="Map.S.html#TYPEkey">key</a> * 'a</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find_last&nbsp;f&nbsp;m</code>, where <code class="code">f</code> is a monotonically decreasing function,
       returns the binding of <code class="code">m</code> with the highest key <code class="code">k</code> such that <code class="code">f&nbsp;k</code>,
       or raises <code class="code"><span class="constructor">Not_found</span></code> if no such key exists.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALfind_last_opt"><span class="keyword">val</span> find_last_opt</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> bool) -> 'a <a href="Map.S.html#TYPEt">t</a> -> (<a href="Map.S.html#TYPEkey">key</a> * 'a) option</code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">find_last_opt&nbsp;f&nbsp;m</code>, where <code class="code">f</code> is a monotonically decreasing function,
       returns an option containing the binding of <code class="code">m</code> with the highest key <code class="code">k</code>
       such that <code class="code">f&nbsp;k</code>, or <code class="code"><span class="constructor">None</span></code> if no such key exists.</p>
</div>
<ul class="info-attributes">
<li><b>Since</b> 4.05</li>
</ul>
</div>

<pre><span id="VALmap"><span class="keyword">val</span> map</span> : <code class="type">('a -> 'b) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'b <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p><code class="code">map&nbsp;f&nbsp;m</code> returns a map with same domain as <code class="code">m</code>, where the
       associated value <code class="code">a</code> of all bindings of <code class="code">m</code> has been
       replaced by the result of the application of <code class="code">f</code> to <code class="code">a</code>.
       The bindings are passed to <code class="code">f</code> in increasing order
       with respect to the ordering over the type of the keys.</p>
</div>
</div>

<pre><span id="VALmapi"><span class="keyword">val</span> mapi</span> : <code class="type">(<a href="Map.S.html#TYPEkey">key</a> -> 'a -> 'b) -> 'a <a href="Map.S.html#TYPEt">t</a> -> 'b <a href="Map.S.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Same as <a href="Map.S.html#VALmap"><code class="code"><span class="constructor">Map</span>.<span class="constructor">S</span>.map</code></a>, but the function receives as arguments both the
       key and the associated value for each binding of the map.</p>
</div>
</div>
</body></html>